(1). Field of the Invention
Arbitration of access to a shared resource. More specifically, arbitration of access to a shared communication port in a system not supporting shared process space.
(2). Related Art
Any time a resource is shared between multiple applications, some form of arbitration is required. A classic type of shared resource is a communication port permitting access to a modem line which carries incoming and outgoing calls to or from one or more applications operating on a host system. It is important that an incoming call is delivered to the correct target application. In systems with operating systems that permit shared process space, such as 16 bit Windows, the arbiter has been instantiated as a dynamic link library (DLL) accessible by all interested applications. This was possible because process space, libraries, memory and variables could all be shared by different applications. Thus, an incoming call was readily routed by the DLL to a correct target application.
Unfortunately for the arbitrator, with the development of 32 bit operating systems such as Windows NT and Windows 95 sharing of process space is no longer permitted. Because DLLs are now loaded into separate process spaces, the arbitrator can not easily be a DLL in itself. If it were, each application using the arbitrator would load its own separate copy of the arbitrator, and each copy of the arbitrator would have to interact with other copies of itself.
However, having the arbitrator as a separate process creates problems, too. As a separate process, the arbitrator cannot communicate as easily as a DLL can with an application. Some form of inter-process communication (IPC) would be needed, instead of the easier method of calling application programming interface (API) functions in a DLL. Thus, the arbitration issues arise again.
Some efforts have been made through APIs to address this issue. These efforts have generally failed to yield satisfactory results. For example, Microsoft's telephony application programming interface, TAPI, provides rudimentary arbitration. Specifically, assuming a system in which five applications are listening for a call, the application first in time will be handed an incoming call. If that application determines the call is not for it, it bears the responsibility of returning the call to TAPI, which will then forward it on to the next application in time. Thus, if a call is directed to the fifth application to listen on the port, if any of the first four applications fail to hand the call-back off to TAPI, the correct target application will never receive the call. Additionally, TAPI is only supported by Windows NT 4.0 and Windows 95 and later versions. Earlier versions have no arbitration support.
In view of the foregoing, it would be desirable to be able to arbitrate access to a modem port to insure reliable message delivery and to permit outgoing calls at appropriate times.